home *** CD-ROM | disk | FTP | other *** search
Wrap
/*******************************/ /* Rotate Blur V2.0 */ /* Image Engineer Macro script */ /* by Simon Edwards */ /* 16/1 97 */ /* */ /* This creates a sort of spin */ /* motion blur effect. */ /*******************************/ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit PROJECT_INFO arg(1) WIDTH sourcewidth=RESULT PROJECT_INFO arg(1) HEIGHT sourceheight=RESULT 'FORM "Rotate Blur" "Ok|Cancel"', ' TEXT,"Creates a rotating blur effect."', ' CYCLE,"Method:","Mix (blurring)|Max (brighten)|Min (darken)",0', ' CYCLE,"Degrees:","1|2|4|8|16",2', ' CYCLE,"Step:","1|0.5|0.25|0.125",1' parse var result ok Method times degrees if ok = 0 then exit select when degrees=0 then degrees=1 when degrees=1 then do degrees=0.5 times=times+1 end when degrees=2 then do degrees=0.25 times=times+2 end when degrees=3 then do degrees=0.125 times=times+3 end end select when Method=0 then Method="MIX 50" when Method=1 then Method="MAX" when Method=2 then Method="MIN" end ROTATE arg(1) degrees BEST temp=RESULT PROJECT_INFO temp WIDTH tempwidth=RESULT PROJECT_INFO temp HEIGHT tempheight=RESULT MARK temp PRIMARY MARK arg(1) SECONDARY COMPOSITE (sourcewidth-tempwidth)/2 (sourceheight-tempheight)/2 method temp2=RESULT CLOSE temp degrees=degrees*2 do while times~=0 ROTATE temp2 degrees BEST temp=RESULT PROJECT_INFO temp WIDTH tempwidth=RESULT PROJECT_INFO temp HEIGHT tempheight=RESULT MARK temp PRIMARY MARK temp2 SECONDARY COMPOSITE (sourcewidth-tempwidth)/2 (sourceheight-tempheight)/2 method temp3=RESULT CLOSE temp2 CLOSE temp temp2=temp3 degrees=degrees*2 times=times-1 end exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end